<div id="tabs">
<!--
        #Column('tipo_destinazione',String(20), nullable=True),
        #Column('denominazione', String(500), nullable=False),
        #Column('url_destinazione', String(200), nullable=True),
        #Column('owner_org', String(20), nullable=True),
        #Column('azione',String(20), nullable=True),
        #Column('apikey', String(20), nullable=True),
        Column('descrizione', Text, nullable=True),
        -->


<form class="form-horizontal" role="form" id="ae_form" action="/pg/ac_ParametriExport/Create" method="post" enctype=multipart/form-data >
<input type="hidden" name="id" value="{{pageData['dao'].id}}"/>
<ul>
    <li><a href="#tabs-1" title="Informazioni principali ed obbligatorie">Dati principali</a></li>
</ul>

<div id="tabs-1">
    <div class="form-group" title="">
        <label class="col-sm-2 col-lg-2 control-label" for="denominazione">Denominazione:</label>
        <div class="col-sm-5 col-lg-5">
            <input class="form-control" type="text" id="denominazione" name="denominazione" value='{{pageData["dao"].denominazione|nonone}}' />
        </div>
    </div>

    <div class="form-group" title="">
        <label class="col-sm-2 col-lg-2 control-label" for="url_destinazione">Url destinazione:</label>
        <div class="col-sm-5 col-lg-5">
            <input class="form-control" type="text" id="url_destinazione" name="url_destinazione" value='{{pageData["dao"].url_destinazione|nonone}}' />
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 col-lg-2 control-label" for="tipo_destinazione" >Tipo destinazione</label>
        <div class="col-sm-5 col-lg-5">
            <select id="tipo_destinazione" name="tipo_destinazione" class="validate[required]">
                <option value="CKAN">CKAN</option>
            </select>
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 col-lg-2 control-label" for="id_organization" >Owner org</label>
        <div class="col-sm-5 col-lg-5">
            <select id="id_organization" name="id_organization" class="">
                <option value=""></option>
                    {% for t in pageData['orgs'] %}
                <option value="{{t.id}}" {{ 'selected="selected"' if t.id == pageData["dao"].id_organization}} >{{t.name}} </option>
                    {% endfor %}
            </select>
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 col-lg-2 control-label" for="azione" >Azione</label>
        <div class="col-sm-5 col-lg-5">
            <select id="azione" name="azione" class="">
                <option value="UPDATE" {{ 'selected="selected"' if "UPDATE" == pageData["dao"].azione}}>UPDATE</option>
                <option value="NEW INSERT" {{ 'selected="selected"' if "NEW INSERT" == pageData["dao"].azione}}>NEW INSERT</option>
            </select>
        </div>
    </div>

    <div class="form-group" title="">
        <label class="col-sm-2 col-lg-2 control-label" for="apikey">Apikey:</label>
        <div class="col-sm-5 col-lg-5">
            <input class="form-control" type="text" id="apikey" name="apikey" value='{{pageData["dao"].apikey|nonone}}' />
        </div>
    </div>

    <div class="form-group" title="">
        <label class="col-sm-2 col-lg-2 control-label" for="descrizione">Descrizione:</label>
        <div class="col-sm-5 col-lg-5">
            <textarea class="form-control" type="text" id="descrizione "name="descrizione" rows=10" cols="85">{{pageData['dao'].descrizione|nonone}}</textarea>
        </div>
    </div>

    <div class="form-group" title="Bottoni di salvataggio e reset del form">
        <div class="col-sm-5 col-lg-5 col-sm-offset-2">
            <input class="btn btn-default" type="submit" value="Salva" name="add"/>
            <input class="btn btn-default" type="button" value="Chiudi" name="chiudi" id="chiudi_edit"/>
        </div>
    </div>

</form>
</div>


<script type="text/javascript">

$(document).ready(function(){
  $("#tagss").select2({tags:["casa", "banane"]});
$("#ae_form").validationEngine();
 $(function() {
$( "#tabs" ).tabs();
});

});
</script>
